<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>通知</title>
    <div th:replace="commonPage::comLink"></div>
</head>
<body>
<div th:replace="commonPage::#loader"></div>
<div th:replace="commonPage::comIndexHeaderMune"></div>


<!--     通知表单    -->
<section class="contact-area padding-top-140px padding-bottom-120px">
    <div class="container">
        <div class="row">
            <div class="col-lg-7 mx-auto">
                <ul class="nav nav-pills">
                    <li role="presentation" class="user-center"><a th:href="@{/userCenter}">个人中心</a></li>
                    <li role="presentation" class="active"><a href="#">通 知</a></li>
                    <li role="presentation" class="user-center"><a th:href="@{/userCenter/communicate}">私 信</a></li>
                </ul>
                <div class="user-form">
                    <div th:if="${notices.list.isEmpty()}">
                        <p> 暂时没有人给你发来消息哦！</p>
                        <hr>
                    </div>
                    <div th:each="notice : ${notices.list}">
                            <span th:class="${notice.notice.hasRead} == 0 ? 'notice-noread':'' "
                                  th:text="${notice.notice.content}"></span>
                        <span class="btn-right"
                              th:text="${#dates.format(notice.notice.gmtCreate,'yyyy-MM-dd HH:mm')}"></span>
                        <br>
                        <a th:href="'/changeRead' +${notice.notice.questionUrl}+'/'+${notice.notice.id}+'/'+${notice.notice.parentId}"
                           class="title-notice">
                            <b>
                                [[${notice.notice.title}]]
                            </b>
                        </a>
                        <hr>
                    </div>
                    <div th:if="${notices.list.isEmpty()==flase}">
                    <a th:href="@{'/changeRead/notices/'+${session.loginUser.userName}}">
                       全部已读 <i class="fa fa-envelope-open fa-lg icon-open-envelope">
                    </i></a>
                    <a th:href="@{'/delete/notices/'+${session.loginUser.userName}}"
                       onclick="return confirmDeleteNotices()" class="btn-right">
                        清空通知 <i class="fa fa-trash-o fa-lg icon-delete">
                        </i></a>
                    </div>
                </div>
            </div>
        </div>
    </div>

                       <!--    通知的分页    一页 7个-->
    <nav aria-label="Page navigation" style="text-align: center">
        <ul class="pagination">
            <li>
                <a th:href="@{'/userCenter/notices' (page=1)}" aria-label="First"
                   th:if="${notices.showFirstPage}">
                    <span aria-hidden="true">首页</span>
                </a>
                <span aria-hidden="true" th:if="${notices.showFirstPage == false}" class="btn-disabled">
                            首页
                        </span>
            </li>
            <li>
                <a th:if="${notices.showPrevious}" th:href="@{ '/userCenter/notices' ( page=${notices.page}-1)}"
                   aria-label="Previous">
                    <span aria-hidden="true">上一页</span>
                </a>
                <span th:if="${notices.showPrevious == false}" aria-hidden="true"
                      class="btn-disabled">上一页</span>
            </li>

            <li th:each="page : ${notices.pages}" th:class="${notices.page == page}? 'active':''">
                <a th:href="@{'/userCenter/notices'( page=${page})}"
                   th:text="${page}">
                </a>
            </li>

            <li>
                <a th:href="@{'/userCenter/notices'(page=${notices.page}+1)}" aria-label="Next"
                   th:if="${notices.showNext}">
                            <span aria-hidden="true">
                                下一页
                            </span>
                </a>
                <span th:if="${notices.showNext == false}" class="btn-disabled">
                                下一页
                        </span>
            </li>
            <li>
                <a th:href="@{ '/userCenter/notices'( page=${notices.totalPage})}" aria-label="End"
                   th:if="${notices.showEndPage}">
                            <span aria-hidden="true">
                                尾页
                            </span>
                </a>
                <span aria-hidden="true" class="btn-disabled" th:if="${notices.showEndPage==false}">
                            尾页
                        </span>
            </li>
        </ul>



    </nav>

</section>
    <div th:replace="commonPage::comFooter">
    </div>
    <div th:replace="commonPage::comScript">
    </div>

</body>
</html>